<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex align-stretch benben-position-layout flex brandStore_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex align-center justify-between flex-sub brandStore_fd0_0'      >
            <view   class='flex align-center'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  brandStore_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex align-center flex-sub brandStore_fd0_0_c1'      >
        <text class='fu-iconfont2  brandStore_fd0_0_c1_c0'  >&#xe738;</text>
<input class='flex-sub brandStore_fd0_0_c1_c1'   type="text" :placeholder="`请输入商品名称`" confirm-type="done" :maxlength="-1" placeholder-style="color:rgba(191, 191, 191, 1);font-size:28rpx"  @input="queryShopListFunc()" v-model="keyword"  />
<image class='brandStore_fd0_0_c1_c2'  mode="aspectFit"  :src='STATIC_URL+"236.png"' @tap.stop="cleanKeywordFunc()" v-if= "keyword!=''"></image>
</view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
    <view class="flex flex-direction align-stretch justify-center benben-position-layout flex brandStore_flex_1"    :style="{top:(87+StatusBarRpx)+'rpx', }">
            <view   class='flex align-center self-center justify-around brandStore_fd1_0'      >
            <view   class='flex align-center brandStore_fd1_0_c0'   @tap.stop="switchComprehensiveFunc(1)"   >
        <text class='brandStore_fd1_0_c0_c0'    v-if= "sort_field!='1'"  >综合</text><text class='brandStore_fd1_0_c0_c0_1'    v-if= "sort_field=='1'"  >综合</text>
</view>
    <view   class='flex align-center brandStore_fd1_0_c1'   @tap.stop="switchShopListFunc(2)" v-if= "showId=='1'"  >
        <text class='brandStore_fd1_0_c1_c0'    v-if= "sort_field!='2'"  >好评</text><text class='brandStore_fd1_0_c1_c0_1'    v-if= "sort_field=='2'"  >好评</text>
<image class='brandStore_fd1_0_c1_c1'  mode="aspectFit"  :src='STATIC_URL+"237.png"'  v-if= "sort_field!='2'"></image>
<image class='brandStore_fd1_0_c1_c1'  mode="aspectFit"  :src='STATIC_URL+"27.png"'  v-if= "sort_field=='2' && sort_type=='desc'"></image>
<image class='brandStore_fd1_0_c1_c1'  mode="aspectFit"  :src='STATIC_URL+"26.png"'  v-if= "sort_field=='2' && sort_type=='asc'"></image>
</view>
    <view   class='flex align-center brandStore_fd1_0_c2'   @tap.stop="switchComprehensiveFunc(3)" v-if= " sort_field!='3'"  >
        <text class='brandStore_fd1_0_c2_c0'      >距离</text>
</view>
    <view   class='flex align-center brandStore_fd1_0_c2'    v-if= "sort_field=='3'"  >
        <text class='brandStore_fd1_0_c3_c0'      >距离</text>
</view>
</view>

        </view>
<view :style="{height: '100rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction align-stretch benben-flex-layout brandStore_flex_2"    >
            <template v-for = '(item,key0) in storList'>
    <view   class='flex flex-direction flex-wrap align-stretch brandStore_fd2_0'       :key='key0'>
            <view   class='flex flex-direction align-stretch'      >
            <view   class='flex flex-wrap align-center'      >
        <image class='brandStore_fd2_0_c0_c0_c0'  mode="aspectFill"  :src='item.store_logo'></image>
    <view   class='flex flex-direction align-stretch flex-sub brandStore_fd2_0_c0_c0_c1'      >
        <text class='brandStore_fd2_0_c0_c0_c1_c0'  >{{item.store_name}}</text>
    <view   class='flex flex-wrap align-center'      >
        <view class='flex flex-wrap align-center'  >
    <template v-for="starNum in [1,2,3,4,5]">
        <image v-if="item.store_star >= starNum" :key="starNum"  class='brandStore_star1fd2_0_c0_c0_c1_c1_c0'  mode="aspectFit"  :src='STATIC_URL+"440.png"'></image>
        <image v-else :key="starNum"  class='brandStore_star1fd2_0_c0_c0_c1_c1_c0'  mode="aspectFit"  :src='STATIC_URL+"169.png"'></image>
    </template>
</view>
<text class='brandStore_fd2_0_c0_c0_c1_c1_c1'  >{{item.store_collection_num}}</text>
<text class='brandStore_fd2_0_c0_c0_c1_c1_c2'  >W人关注</text>
</view>
</view>
    <view   class='flex flex-direction align-center self-center justify-center'      >
        <button class='brandStore_fd2_0_c0_c0_c2_c0'   ></button>
    <view   class='flex flex-wrap align-center'      >
        <image class='brandStore_fd2_0_c0_c0_c2_c1_c0'  mode="aspectFit"  :src='STATIC_URL+"442.png"'></image>
<text class='brandStore_fd2_0_c0_c0_c2_c1_c1'  >{{item.juli}}</text>
<text class='brandStore_fd2_0_c0_c0_c2_c1_c1'  >km</text>
</view>
</view>
</view>
    <view   class='flex align-center brandStore_fd2_0_c0_c1'    v-if= " item.goods_list.length>0"  >
            
    <scroll-view  class='brandStore_fd2_0_c0_c1_c0'  :scroll-x='true'  >
        <view class='flex benben-scroll flex align-center'    >
                <template v-for = '(child,key1) in item.goods_list'>
    <view   class='flex flex-wrap align-center justify-center brandStore_fd2_0_c0_c1_c0_c0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/?id=${child.goods_id}`"    :key='key1'>
        <image class='brandStore_fd2_0_c0_c1_c0_c0_c0'  mode="aspectFill"  :src='child.goods_thumb'></image>
    <view   class='flex align-center justify-center brandStore_fd2_0_c0_c1_c0_c0_c1'      >
        <text class='brandStore_fd2_0_c0_c1_c0_c0_c1_c0'  >￥</text>
<text class='self-center brandStore_fd2_0_c0_c1_c0_c0_c1_c1'  >{{child.shop_price}}</text>
</view>
</view>
    </template>
    
</view>
    </scroll-view>
    
</view>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"sort_field":"1","sort_type":"desc","storList":[],"showId":"1","keyword":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            let {keyword}=options
if (keyword !== undefined) this.keyword = keyword
this.queryShopListFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.queryShopListFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //商品搜索-获取店铺列表
                 queryShopListFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post641e88b843d57;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {keyword:this.keyword,sort:this.sort_field,order:this.sort_type}
                this.listData = [];
                this.storList = this.listData;
                this.pagingListToggle();
                },
                //清空关键词
                 cleanKeywordFunc(){
                        this.keyword = ''
                    this.queryShopListFunc()
                },
                //切换商品排序
                 switchShopListFunc(type){
                       this.sort_field = type;
    if( this.sort_type=='desc'){
           this.sort_type = 'asc';
    }
    else{
           this.sort_type = 'desc';
    }
   this.showId = '1';
                    this.queryShopListFunc()
                },
                //综合切换
                 switchComprehensiveFunc(typeID){
                       this.sort_field = typeID;
                    this.queryShopListFunc()
                return
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#F8F8F8;background-size: 100% auto;
        }
    .brandStore_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .brandStore_fd0_0_c1_c2{
        width:20rpx;height:20rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .brandStore_fd0_0_c1_c1{
        font-size:28rpx;font-weight:400;color:#333;
    }
    .brandStore_fd0_0_c1_c0{
        font-size:24rpx;color:rgba(153, 153, 153, 1);margin:0rpx 14rpx 0rpx 0rpx;
    }
    .brandStore_fd0_0_c1{
        background:#F9F9F9;height:64rpx;border-radius:34rpx 34rpx 34rpx 34rpx;padding:0rpx 24rpx 0rpx 24rpx;margin:0rpx 0rpx 0rpx 32rpx;
    }
    .brandStore_fd0_0_c0_c0{
        font-size:36rpx;font-weight:500;color:#333;
    }
    .brandStore_fd0_0{
        padding:0rpx 24rpx 0rpx 24rpx;line-height:88rpx;
    }
    .brandStore_flex_1{
        background:#fff;width:750rpx;height:100rpx;overflow:hidden;z-index:10;top:87rpx;background-size:100% auto !important;
    }
    .brandStore_fd1_0_c3_c0{
        color:var(--benbenFontColor5);font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .brandStore_fd1_0_c2_c0{
        color:#333333;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .brandStore_fd1_0_c2{
        margin:0rpx 61rpx 0rpx 0rpx;
    }
    .brandStore_fd1_0_c1_c1{
        width:10rpx;height:18rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .brandStore_fd1_0_c1_c0_1{
        font-size:28rpx;font-weight:400;line-height:40rpx;margin:0rpx 10rpx 0rpx 0rpx;color:var(--benbenFontColor5);
    }
    .brandStore_fd1_0_c1_c0{
        color:#333333;font-size:28rpx;font-weight:400;line-height:40rpx;margin:0rpx 10rpx 0rpx 0rpx;
    }
    .brandStore_fd1_0_c1{
        margin:0rpx 64rpx 0rpx 0rpx;
    }
    .brandStore_fd1_0_c0_c0_1{
        font-size:28rpx;font-weight:500;line-height:35rpx;color:var(--benbenFontColor5);
    }
    .brandStore_fd1_0_c0_c0{
        color:rgba(51, 51, 51, 1);font-size:28rpx;font-weight:500;line-height:35rpx;
    }
    .brandStore_fd1_0_c0{
        margin:0rpx 49rpx 0rpx 0rpx;
    }
    .brandStore_fd1_0{
        padding:0rpx 0rpx 0rpx 47rpx;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .brandStore_flex_2{
        padding:0rpx 24rpx 0rpx 24rpx;
    }
    .brandStore_fd2_0_c0_c1_c0_c0_c1_c1{
        color:#FFFFFF;font-size:24rpx;font-weight:700;line-height:32rpx;text-align:center;
    }
    .brandStore_fd2_0_c0_c1_c0_c0_c1_c0{
        color:var(--benbenFontColor3);font-size:24rpx;font-weight:700;line-height:32rpx;
    }
    .brandStore_fd2_0_c0_c1_c0_c0_c1{
        background:rgba(222, 54, 37, 1);position:absolute;border-radius:21rpx 21rpx 21rpx 21rpx;height:36rpx;bottom:-18rpx;padding:2rpx 12rpx 2rpx 12rpx;
    }
    .brandStore_fd2_0_c0_c1_c0_c0_c0{
        width:210rpx;height:210rpx;border-radius:16rpx 16rpx 16rpx 16rpx;
    }
    .brandStore_fd2_0_c0_c1_c0_c0{
        position:relative;margin:0rpx 12rpx 0rpx 0rpx;
    }
    .brandStore_fd2_0_c0_c1_c0{
        touch-action:none;width:650rpx;height:240rpx;
    }
    .brandStore_fd2_0_c0_c1{
        margin:24rpx 0rpx 0rpx 0rpx;
    }
    .brandStore_fd2_0_c0_c0_c2_c1_c1{
        color:var(--benbenFontColor6);font-size:22rpx;
    }
    .brandStore_fd2_0_c0_c0_c2_c1_c0{
        width:24rpx;height:24rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 06rpx 0rpx 0rpx;
    }
    .brandStore_fd2_0_c0_c0_c2_c0{
        background:url(https://www.guochaoxiaoju.com/uploads/mini/441.png) no-repeat ,transparent;width:96rpx;height:40rpx;margin:0rpx 0rpx 14rpx 0rpx;background-size:100% 100%;
    }
    .brandStore_fd2_0_c0_c0_c1_c1_c2{
        font-size:22rpx;color:var(--benbenFontColor6);
    }
    .brandStore_fd2_0_c0_c0_c1_c1_c1{
        color:var(--benbenFontColor6);margin:0rpx 0rpx 0rpx 10rpx;
    }
    .brandStore_star1fd2_0_c0_c0_c1_c1_c0{
        height:18rpx;margin:0rpx 5rpx 0rpx 5rpx;width:18rpx;
    }
    .brandStore_star1fd2_0_c0_c0_c1_c1_c0{
        width:18rpx;height:18rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx 5rpx 0rpx 5rpx;
    }
    .brandStore_fd2_0_c0_c0_c1_c0{
        color:var(--benbenFontColor0);font-size:28rpx;font-weight:700;margin:0rpx 0rpx 20rpx 0rpx;
    }
    .brandStore_fd2_0_c0_c0_c1{
        margin:0rpx 16rpx 0rpx 16rpx;
    }
    .brandStore_fd2_0_c0_c0_c0{
        width:88rpx;height:88rpx;border-radius:44rpx 44rpx 44rpx 44rpx;
    }
    .brandStore_fd2_0{
        background:var(--benbenbgColor1);background-size:100% auto !important;margin:20rpx 0rpx 0rpx 0rpx;padding:32rpx 24rpx 32rpx 24rpx;border-radius:16rpx 16rpx 16rpx 16rpx;
    }
</style>